package utils;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

public class PropertiesHandler {

	private static ClassLoader loader = new PropertiesHandler().getClass().getClassLoader();
	
	public static String getServerIp() throws FileNotFoundException, IOException{
		Properties prop = new Properties();
		prop.load(loader.getResourceAsStream("server.properties"));
		return prop.getProperty("ip");
	}
	
	public static String getFacturasFolder() throws IOException{
		Properties prop = new Properties();
		prop.load(loader.getResourceAsStream("server.properties"));
		return prop.getProperty("facturas");
	}
	
	public static String getCotizacionesFolder() throws FileNotFoundException,IOException{
		Properties prop = new Properties();
		prop.load(loader.getResourceAsStream("server.properties"));
		return prop.getProperty("cotizaciones");
	}
	
	public static String getOrdenesCompraFolder() throws FileNotFoundException,IOException{
		Properties prop = new Properties();
		prop.load(loader.getResourceAsStream("server.properties"));
		return prop.getProperty("ordenesCompra");
	}
	
	
}
